package com.ruoyi.Amount.controller;

import com.ruoyi.Amount.domain.DTO.AddDTO;
import com.ruoyi.Amount.result.Result;
import com.ruoyi.Amount.service.AmountService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/amount/adds")
public class amountAdd {

    @Autowired
    private AmountService amountService;

    /**
     * 商户充值
     *
     * @param addDTO
     * @return
     */
    @PostMapping("/store")
    public AjaxResult storeAdd(@RequestBody AddDTO addDTO) {
        return amountService.storeAddAmount(addDTO);
    }

    /**
     * 代理商充值
     *
     * @param addDTO
     * @return
     */
    @PostMapping("/agent")
    public AjaxResult agentAdd(@RequestBody AddDTO addDTO) {
        return amountService.agentAddAmount(addDTO);
    }

}
